<style>
.isedit{border: 1px dashed #18bc9c;}
</style>
<div class="weui_cells_title" style="margin:0.5rem;padding-left:0.2rem">{{pagedata.type>0?'补充表单内容':'表单内容'}}</div>
<div ng-class="{'item-up-content item-ng':1,'isedit':pagedata.editkey==$index}" style="margin-bottom:0.3rem" ng-repeat="item in pagedata.post.diyform">
					<div class="weui_cells">
						<div class="weui_cell" style="padding-top:0">
							<div class="weui_cell_hd" ng-click="pagedata.post.diyform.splice($index,1)" style="padding-right:0">
							<i class="icon icon-jian bold red"></i>
							</div>
							<div class="weui_cell_hd" style="padding-right:0">
							<label class="weui_label bold">{{$index+1}}.</label>
							</div>
							<div class="weui_cell_bd weui_cell_primary ">
								<input class="weui_input bold" type="text" ng-model="item.title" placeholder="输入{{item.typename}}标题">
							</div>
							<div ng-if="item.type == 4 || item.type == 5" class="weui_cell_bd weui_cell_primary gray">
								({{item.type == 4?'单选':'多选'}})
							</div>
							<div ng-if="pagedata.editkey!=$index" class="weui_cell_ft gray" ng-click="pagedata.editkey=$index">
								<i class="icon icon-shuru"></i>
							</div>
						</div>
						<div ng-if="pagedata.editkey==$index">
						<div class="weui_cell" ng-repeat="d in item.value">
							<div class="weui_cell_bd weui_cell_primary">
								<input class="weui_input" type="text" ng-model="d.title" placeholder="输入{{d.title}}">
							</div>
							<div class="weui_cell_ft" ng-click="item.value.splice($index,1)">
								<i class="icon icon-jian bold red"></i>
							</div>
						</div>
						<div ng-if="item.type == 4 || item.type == 5" class="weui_cell">
							<div class="weui_cell_bd weui_cell_primary" ng-click="item.value.push({'title':'选项'+item.value.length});">
								+ 新选项
							</div>
						</div>
						<div ng-if="pagedata.editkey==$index" class='weui_cell c' style="background:#f2f2f2;padding:0.2rem 0.3rem">
							<div class='weui_cell_bd weui_cell_primary'>
								<div style="font-size:0.6rem;">必填? <input class="weui_switch" style="width:2.5rem" type="checkbox" ng-model="item.ismust"></div>
							</div>
							<div ng-class="{'weui_cell_bd weui_cell_primary':1,'disabled':$index+1==pagedata.post.diyform.length || pagedata.post.diyform.length<=1}">
								<i class="icon icon-xiayi" ng-click="pagedata.nowitem=pagedata.post.diyform[$index+1];pagedata.post.diyform.splice($index+1,1);pagedata.post.diyform.splice($index,0,pagedata.nowitem)" style="font-size:0.6rem;color:#999"> 下移</i>
							</div>
							<div ng-class="{'weui_cell_bd weui_cell_primary':1,'disabled':$index==0 || pagedata.post.diyform.length<=1}">
								<i class="icon icon-shangyi" ng-click="pagedata.post.diyform.splice($index-1,0,item);pagedata.post.diyform.splice($index+1,1)" style="font-size:0.6rem;color:#999"> 上移</i>
							</div>
						</div>
						</div>
					</div>
</div>
<div class="item-up-content">
		<div class="c">(点击下面图标添加表单)</div>
				<div class="fui-icon-group noborder col-6" style="margin-top:0.5rem">
					<div class="fui-icon-col external" ng-click="pagedata.post.diyform.push({'typename':'填空','type':1});">
						<div class="icon icon-green radius" style="height:0.8rem;line-height:0.8rem;"><i class="icon icon-shuru" style="font-size:16px;color:#999;height:0.8rem;line-height:0.8rem;"></i></div>
						<div class="text" style="color: #999;padding:0">填空</div>
					</div>
					<div class="fui-icon-col external" ng-click="pagedata.post.diyform.push({'typename':'图片','type':3});">
						<div class="icon icon-green radius" style="height:0.8rem;line-height:0.8rem;"><i class="icon icon-lunbo" style="font-size:16px;color:#999;height:0.8rem;line-height:0.8rem;"></i></div>
						<div class="text" style="color: #999;padding:0">图片</div>
					</div>
					<div class="fui-icon-col external" ng-click="pagedata.post.diyform.push({'typename':'文本','type':6});">
						<div class="icon icon-green radius" style="height:0.8rem;line-height:0.8rem;"><i class="icon icon-tuwenwenzhen" style="font-size:16px;color:#999;height:0.8rem;line-height:0.8rem;"></i></div>
						<div class="text" style="color: #999;padding:0">文本</div>
					</div>
					<div class="fui-icon-col external" ng-click="pagedata.post.diyform.push({'typename':'地址','type':7});">
						<div class="icon icon-green radius" style="height:0.8rem;line-height:0.8rem;"><i class="icon icon-map" style="font-size:16px;color:#999;height:0.8rem;line-height:0.8rem;"></i></div>
						<div class="text" style="color: #999;padding:0">地址</div>
					</div>
					<div class="fui-icon-col external" ng-click="pagedata.post.diyform.push({'typename':'单选','type':4,'value':[]});">
						<div class="icon icon-green radius" style="height:0.8rem;line-height:0.8rem;"><i class="icon icon-success" style="font-size:16px;color:#999;height:0.8rem;line-height:0.8rem;"></i></div>
						<div class="text" style="color: #999;padding:0">单选</div>
					</div>
					<div class="fui-icon-col external" ng-click="pagedata.post.diyform.push({'typename':'多选','type':5,'value':[]});">
						<div class="icon icon-green radius" style="height:0.8rem;line-height:0.8rem;"><i class="icon icon-category" style="font-size:16px;color:#999;height:0.8rem;line-height:0.8rem;"></i></div>
						<div class="text" style="color: #999;padding:0">多选</div>
					</div>
				</div>
</div>
<script>
scope.pagedata.editkey=0;
</script>